package com.journaldev.spring.service;

import java.util.List;

import com.journaldev.spring.dao.PersonalOfficeDAO;
import com.journaldev.spring.model.PersonalOffice;

public class PersonalOfficeServiceImpl implements PersonalOfficeService {
	
	public PersonalOfficeDAO officeDAO;

	public PersonalOfficeDAO getOfficeDAO() {
		return officeDAO;
	}

	public void setOfficeDAO(PersonalOfficeDAO officeDAO) {
		this.officeDAO = officeDAO;
	}

	@Override
	public void addOffice(PersonalOffice p) {
		// TODO Auto-generated method stub
		this.officeDAO.addOffice(p);
	}

	@Override
	public void updateOffice(PersonalOffice p) {
		// TODO Auto-generated method stub
		this.officeDAO.updateOffice(p);
	}

	@Override
	public List<PersonalOffice> listOffice() {
		// TODO Auto-generated method stub
		return this.officeDAO.listOffice();
	}

	@Override
	public PersonalOffice getOfficeById(int id) {
		// TODO Auto-generated method stub
		return this.officeDAO.getOfficeById(id);
	}

	@Override
	public void removeOffice(int id) {
		// TODO Auto-generated method stub
		this.officeDAO.removeOffice(id);
	}

}
